//
//  NetWorkBaseAPIManager.h
//  TuanLife
//
//  Created by 伏圣文 on 2017/12/23.
//  Copyright © 2017年 HuiNaMac. All rights reserved.
//

#import <Foundation/Foundation.h>
 
typedef enum {
    Get = 0,
    Post,
    Put,
    Delete,
    Patch
} NetworkMethod;

@interface NetWorkBaseAPIManager : NSObject

 
/**
 单列
 
 @return 单列
 */
+ (NetWorkBaseAPIManager *)manager;

/**
 *  api请求统一调用接口
 *
 *  @param methodName get 或者post
 *  @param url        url地址
 *  @param params     请求参数
 */
- (void)requestHttpWithMethod:(NetworkMethod)methodName
                          url:(NSString *)url
                   parameters:(NSDictionary *)params
                       isJson:(BOOL)isJson
                      success:(void (^)(id responseObject))success
                      failure:(void (^)(NSString *errorDesc))failure;
/**
 *  api请求图片上传统一调用接口
 *
 *  @param methodName get 或者post
 *  @param url        url地址
 *  @param image      图片
 *  @param params     请求参数
 */
- (void)requestHttpUploadWithMethod:(NetworkMethod)methodName
                                url:(NSString *)url
                         parameters:(NSDictionary *)params
                             isJson:(BOOL)isJson
                              image:(NSArray *)image
                            success:(void (^)(id responseObject))success
                            failure:(void (^)(NSString *errorDesc))failure;

/**
 *  api请求多张图片上传统一调用接口
 *
 *  @param methodName get 或者post
 *  @param url        url地址
 *  @param image      图片
 *  @param params     请求参数
 */
- (void)requestHttpUploadsWithMethod:(NetworkMethod)methodName
                                 url:(NSString *)url
                          parameters:(NSDictionary *)params
                              isJson:(BOOL)isJson
                               image:(NSMutableDictionary *)image
                             success:(void (^)(id))success
                             failure:(void (^)(NSString *))failure;
@end
